CPU Scheduling
Q31.
Below is the precedence graph for a set of tasks to be executed on a parallel processing system S. What is the efficiency of this precedence graph on S if each of the tasks T_1, \dots, T_8 takes the same time and the system S has five processors?Q32.
The following table shows the processes in the ready queue and time required for each process for completing its job.\begin{array}{ll} \text { Process } & \text { Time } \\ P_{1} & 10 \\ P_{2} & 5 \\ P_{3} & 20 \\ P_{4} & 8 \\ P_{5} & 15 \end{array}If round-robin scheduling with 5 ms is used what is the average waiting time of the processes in the queue?Q33.
Consider the following table of arrival time and burst time for three processes P0, P1 and P2. The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?Q34.
Which of the following statements are true? I. Shortest remaining time first scheduling may cause starvation II. Preemptive scheduling may cause starvation III. Round robin is better than FCFS in terms of response timeQ35.
Consider a set of 5 processes whose arrival time, CPU time needed and the priority are given below:\begin{array}{llll} \text { Process Priority } & \text { Arrival Time (in ms) } & \text { CPU Time Needed } & \text { Priority } \\ \text { P1 } & 0 & 10 & 5 \\ \text { P2 } & 0 & 5 & 2 \\ \text { P3 } & 2 & 3 & 1 \\ \text { P4 } & 5 & 20 & 4 \\ \text { P5 } & 10 & 2 & 3 \end{array}(smaller the number, higher the priority) If the CPU scheduling policy is priority scheduling without pre-emption, the average waiting time will beQ37.
The correct matching of the following pairs is\begin{array}{|l|l|l|l|} \hline \text{A.} & \text{Disk check} & \text{i.} & \text{Round robin} \\\hline \text{B.}& \text{Batch processing} & \text{ii.} & \text{Scan} \\\hline \text{C.} & \text{Time sharing} & \text{iii.} & \text{LIFO} \\\hline \text{D.} & \text{Stack operation} & \text{iv.} & \text{FIFO} \\\hline \end{array}Q38.
Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.